package com.ray.service;

import com.ray.dao.UserDao;
import com.ray.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService
{
    public void setUserDao(UserDao userDao)
    {
        this.userDao = userDao;
    }

    @Autowired
    UserDao userDao;

    /**
     * @param id
     * @return
     */
    @Override
    public User getUserById(long id)
    {
        return userDao.getUserById(id);
    }

    /**
     * @return
     */
    @Override
    public List<User> getUserList()
    {
        return userDao.getUserList();
    }
}
